package com.bridge.applets.model.enums;

import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

@Getter
public enum GirderTypeEnum {

    TYPE_1("简支梁", "1"),
    TYPE_2("连续梁", "2");

    private final String name;
    private final String value;

    private static Map<String, String> maps = Arrays.stream(values()).collect(Collectors.toMap(GirderTypeEnum::getName, GirderTypeEnum::getValue));

    GirderTypeEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public static String getValueByName(String name) {
        return maps.get(name);
    }
}